package com.example.mybatisdemoplus.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.mybatisdemoplus.Entity.OrgCreate;
import com.example.mybatisdemoplus.Mapper.OrgCreateMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//获取orgId 单独的OrgService
@Service
public class OrgService {
    @Resource
    OrgCreateMapper orgCreateMapper;

    public Object addOrg(OrgCreate orgCreate) {
        return orgCreateMapper.insert(orgCreate);
    }

    public Object getOrg(OrgCreate orgCreate) {
        return orgCreateMapper.selectOne(new QueryWrapper<OrgCreate>().eq("orgName",orgCreate.getOrgName()));
    }
}
